package com.braveman.im.ui.holder;

import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.braveman.im.R;
import com.braveman.im.bean.SearchBean;
import com.ht.baselibs.core.EventCenter;
import com.ht.baselibs.core.EventCode;
import com.ht.baselibs.ui.adapter.DefaultAdapter;
import com.ht.baselibs.ui.base.BaseViewHolder;

import de.greenrobot.event.EventBus;

/**
 * Created by Administrator on 2017/10/17.
 */

/**
 * 名片搜索
 */
public class SearchHolder extends BaseViewHolder<SearchBean> {
    private TextView name;
    private TextView duty;
    private TextView company_name;
    private ImageView item_img;
    private int position;


    public SearchHolder(int position) {
        super(R.layout.item_mine_card);
        this.position = position;
    }

    @Override
    protected void initView() {
        name = findViewById(R.id.tv_name);
        duty = findViewById(R.id.tv_duty);
   //     company_name = findViewById(R.id.tv_company_name);
   //     item_img = findViewById(R.id.item_img_item);
    }

    @Override
    protected void refreshView(SearchBean searchBean) {
        name.setText(searchBean.name);
        duty.setText(searchBean.duty);
      //  company_name.setText(searchBean.company_name);
//        item_img.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                SearchBean searchBean1 = new SearchBean();
//                searchBean1.position = position;
//                EventBus.getDefault().post(new EventCenter(EventCode.EVENT_REFRESH_LIST_SEARCH, searchBean1));
//            }
//        });
    }
}
